<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://unpkg.com/vue/dist/vue.js"></script>
    <script src="https://unpkg.com/vue-router/dist/vue-router.js"></script>
</head>
<body>

<div id="app">
    <router-link to="/app/1">app</router-link>
    <router-link to="/app/2">app</router-link>
    <router-link to="/app/2">app</router-link>
</div>
<script>
    const tpl = {
        template:"<div>h122222</div>"
    }
    let router = new VueRouter({
        routes:[
            {
                path:"/app/:id",
                component:tpl
            }
        ]
    })
    var vm = new Vue({
        router
    }).$mount("#app")
</script>
</body>
</html>